#include <vector>
#include <string>
#include <utility>

class big_int
{
private:
   std::vector <int> digits;
   static const int BASE = 1000000000;
   static const int BASE_LENGTH = 9;


public:
   big_int(int a);
   big_int(std::string sa);
   big_int(std::vector<int> va);
   std::pair<big_int, big_int> divide(const big_int& b);
   std::string to_string();
   int compare_to(const big_int& b, int shift);
   size_t length() const;
   big_int multiply(int b) const;
   big_int subtract(const big_int& b, int shift);

private:
   void delete_zeros();
   int find_divisor(const big_int& b, int shift);


};